/*************************************************************************
	> File Name: execve_test.c
	> Author: Angel Criss
	> Blog: blog.abbycin.tk 
	> Created Time: Wed 09 Jul 2014 10:14:45 AM CST
 ************************************************************************/

#include"head.h"
extern char **environ;
int main(int argc,char *argv[]){
    int j;
    char **eviron_parameter;

    for(j=0;j<argc;j++) // argc is the number of execve()'s parameter number + eviron number
    {
        sleep(1);
        printf("argv[%d] = %s\n",j,argv[j]);
    }
    for(eviron_parameter=environ;*eviron_parameter!=NULL;eviron_parameter++)
        printf("evironment is :%s\n",*eviron_parameter);
    exit(EXIT_SUCCESS);
}
